<div class="container-fluid">
    <div id="pad-wrapper">
        <!-- products table-->
        <!-- the script for the toggle all checkboxes from header is located in js/theme.js -->
        <div class="table-wrapper products-table section">
            <div class="row-fluid head">
                <div class="span12">
                    <h4>产品列表</h4>
                </div>
            </div>


            <div class="row-fluid">
                <table class="table table-hover">
                    <thead>

                    <tr>
                        <th class="span1"><span class="line"></span>产品ID</th>
                        <th class="span2"><span class="line"></span>产品名称</th>
                        <th class="span2"><span class="line"></span>轮播图</th>
                        <th class="span2"><span class="line"></span>操作</th>
                    </tr>

                    </thead>
                        <tbody>
                        <?php if ($list): ?>
                            <?php foreach ($list as $item): ?>
                                <!-- row -->
                                    <td ><?php echo $item['product_id'] ?></td>
                                    <td ><?php echo $item['product_name'] ?></td>
                                    <td >
                                    <?php foreach($item['jpg'] as $v) { ?>
                                       <img src="<?php echo  STATIC_IMAGE.'upload/product_jpg/'.$v['jpg_imgurl'] ?>" height="50" width="50" />
                                    <?php } ?>
                                    </td>
                                    <td>        
                                                <a href="/product/edit?id=<?php echo $item['product_id']?>" class=" btn-flat primary">编辑</a>
						
						<a href="/product/delete?id=<?php echo $item['product_id']?> "class=" btn-flat primary">
                                                    <?php
                                                    if($item['is_sale'] == 1){
                                                        echo "下架";
                                                    }elseif($item['is_sale'] == 2){
                                                        echo "上架";
                                                    }
                                                    ?>
                                                </a><?php if($item['category_id'] == 3 ):?>
                                        <a href="/product-jpg/index?id=<?php echo $item['product_id']?>" class=" btn-flat primary">轮播图</a>
			                            <?php endif;?>
                                    </td>
                                </tr>
                            <?php endforeach; ?>
                        </tbody>
                </table>
                <div>
                    <a href="/product/save?cate_id=1" class="mr5 btn btn-primary">添加检测类产品</a>
                    <a href="/product/save?cate_id=3" class="mr5 btn btn-primary">添加普通产品</a>
                </div>
            </div>
        </div>
        <!-- end products table -->
    </div>
    <div class="pagination alternate">
             <?php echo $pagination;?>
		</div>
		<?php else:?>
		<div class="alert alert-info alert-nolist">
			<h4 class="alert-heading">暂无数据</h4>
		</div>
		<?php endif;?>
    <!--Edited by ysy Start-->
    
   
    <style>
        th {
            text-align: center !important;
        }

        table td {
            text-align: center !important;
        }

        table th span.line {
            left: 0 !important;
        }

        th.clickable {
            cursor: pointer;
        }

        th.clickable_time {
            cursor: pointer;
        }

        th.clickable .icon {
            margin-left: 10px;
        }

        th.clickable_time .icon {
            margin-left: 10px;
        }
    </style>
    <!--Edited by ysy End-->
</div>
<script src="/scripts/libs/require/require.js" type="text/javascript" data-main="/scripts/app/list/main"></script>